package domain;

public class Post {
	private Integer id;
	private Document document;
	private Integer wordFrequency;
	
	// Atributos utilizados para la ponderacion de la busqueda
	private Vocabulary vocabulary;

	public Post() {
		document = new Document();
	}

	/**
	 * Acceso a id
	 * @return valor del atributo id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Modificador de id
	 * @param id nuevo valor del atributo id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Acceso a document
	 * @return valor del atributo document
	 */
	public Document getDocument() {
		return document;
	}

	/**
	 * Modificador de document
	 * @param document nuevo valor del atributo document
	 */
	public void setDocument(Document document) {
		this.document = document;
	}

	/**
	 * Acceso a wordFrequency
	 * @return valor del atributo wordFrequency
	 */
	public Integer getWordFrequency() {
		return wordFrequency;
	}

	/**
	 * Modificador de wordFrequency
	 * @param wordFrequency nuevo valor del atributo wordFrequency
	 */
	public void setWordFrequency(Integer wordFrequency) {
		this.wordFrequency = wordFrequency;
	}

	/**
	 * Acceso a vocabulary
	 * @return valor del atributo vocabulary
	 */
	public Vocabulary getVocabulary() {
		return vocabulary;
	}

	/**
	 * Modificador de vocabulary
	 * @param vocabulary nuevo valor del atributo vocabulary
	 */
	public void setVocabulary(Vocabulary vocabulary) {
		this.vocabulary = vocabulary;
	}

	public boolean equals(Object o) {
		Post p = (Post) o;
		return (p.document.equals(this.document));
	}
}
